package edu.zli.hungry;

/**
 * @author ZerlindaLi create at 2021/3/18 10:24
 * @version 1.0.0
 * @description 逼格高一点的饿汉式单例，本质上没啥变化，依然是类加载时就完成实例初始化，
 */
public class HungryStaticSingle {

    private static HungryStaticSingle instance;

    static {
        instance = new HungryStaticSingle();
    }

    private HungryStaticSingle(){}

    public static HungryStaticSingle getInstance() {
        return instance;
    }
}
